
define(['vue','config','common'],function(Vue,config,utils){
	'use strict';

	var allianceDetailView=new Vue({
		el:'#app',
		data:{
			shopsName:'',
			shopsPic:'',
			facadePhoto:'',
			shopsAddress:'',
			summary:'',
			shopsLinkphone:'',
			shopsLinkman:''
		},
		created:function(){
			var _this = this;
			var shopsId = utils.getQueryVariable('shopsId');
			var formData = new FormData();
			formData.append('id',shopsId)
			$.ajax({
		        type:"POST",
		        url: utils.getWebUrl('shop/examineUnion'),
		        data: formData,
		        headers: {
	            	'authorization': 'Bearer '+utils.userToken()
	            },
		        async: true,
		        processData: false,
		        contentType: false,
		        xhrFields: {withCredentials: true},
	            crossDomain: true,
	            beforeSend:function(){
	            	$('.DataLoading').show();
	            },
	            complete:function(){
	            	$('.DataLoading').hide();
	            },
		        success:function(res){
		           	if(res.code === "10000"){
		           		_this.shopsName = res.data.shopsName;
		           		if(res.data.shopsPic==null || res.data.shopsPic==''){
		           			_this.shopsPic = res.data.facadePhoto;
		           		}else{
		           			_this.shopsPic = res.data.shopsPic;
		           		}
					
						_this.shopsAddress = res.data.shopsAddress;
						_this.summary = res.data.summary;
						_this.shopsLinkphone = res.data.shopsLinkphone;
						_this.shopsLinkman = res.data.shopsLinkman;
		           	}else{
		           		utils.appAlert(res.msg)
		           	}
		        },
		        error: function(res){
                    utils.appAlert('网络异常');
                }
		    });	
		},
		methods:{

		}
	})

	return allianceDetailView
});